home *** CD-ROM | disk | FTP | other *** search
- Subject: v20i033: Troff upgrade for PostScript, DiTroff compatibility, Part01/06
- Newsgroups: comp.sources.unix
- Sender: sources
- Approved: rsalz@uunet.UU.NET
-
- Submitted-by: Chris Lewis <eci386!clewis@uunet.uu.net>
- Posting-number: Volume 20, Issue 33
- Archive-name: psroff/part01
-
- Normal UNIX troff only prints its output on WANG C/A/T Phototypesetters.
- This package contains a generic interface between standard troff and
- other types of printers. The package has a driver for PostScript printers
- (Eg: Apple Laserwriters), a partial implementation of a driver for HP
- Laserjet family printers, and a Ditroff output option.
-
- In fact, this package can be used to, in effect, upgrade CAT troff
- to be ditroff. There are limitations, but you get what you pay for.
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 6)."
- # Contents: MANIFEST README confid.ps dt.h font font/C font/CB font/CO
- # font/S2 fonts.dt fonts.lj fonts.ps gfnttab.sh lethead.ps lib.dt
- # lib.lj lib.lk lj.h ps.h psroff.1 psroff.sh t2conf.c tmac.t2
- # upload.sh utils.c
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'MANIFEST' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MANIFEST'\"
- else
- echo shar: Extracting \"'MANIFEST'\" \(3082 characters\)
- sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
- X File Name Archive # Description
- X-----------------------------------------------------------
- X MANIFEST 1 This shipping list
- X Makefile 3 Makefile
- X README 1 Read this first
- X cat.5 3 Man page describing CAT Troff output
- X chartab.m 3 troff test job to display whole character set
- X confid.ps 1 sample Postscript inclusion
- X defs.h 2 Main configuration include
- X dit2catwid.c 3 converts ditroff width tables to CAT
- X dt.c 5 ditroff driver
- X dt.h 1 ditroff driver include file
- X font 1 font directory
- X font/B 2 font width table
- X font/BB 2 font width table
- X font/BI 2 font width table
- X font/BO 2 font width table
- X font/BR 2 font width table
- X font/BX 2 font width table
- X font/C 1 font width table
- X font/CB 1 font width table
- X font/CO 1 font width table
- X font/CX 2 font width table
- X font/H 2 font width table
- X font/HB 2 font width table
- X font/HO 2 font width table
- X font/HX 2 font width table
- X font/I 2 font width table
- X font/PA 2 font width table
- X font/PB 2 font width table
- X font/R 2 font width table
- X font/S 2 font width table
- X font/S2 1 font width table (special for bracket font)
- X fonts.dt 1 ditroff font definitions
- X fonts.lj 1 lj font definitions
- X fonts.lk 3 lk font definitions
- X fonts.ps 1 postscript font definitions
- X genftable.ps 4 Postscript width table generator
- X gfnttab.sh 1 create and install CAT width tables
- X lethead.ps 1 sample letter head postscript include
- X lib.dt 1 ditroff predef
- X lib.lj 1 lj predef
- X lib.lk 1 lk predef
- X lib.ps 4 postscript predef
- X lj.c 4 lj driver
- X lj.h 1 lj driver include
- X ljtables.c 6 lj/lk character set definitions
- X ltest.m 3 test script
- X ps.c 5 postscript driver
- X ps.h 1 postscript include
- X psroff.1 1 man page for psroff
- X psroff.sh 1 psroff shell script
- X psxlate.c 3 page order flipper
- X showfont.sh 3 display postscript font with width info
- X t2conf.c 1 troff2 backend manager
- X tmac.t2 1 sample custom macros
- X troff2.c 4 troff2 mainline
- X troff2ps.1 3 manpage for troff2
- X upload.sh 1 dumb width uploader for postscript
- X utils.c 1 misc functions for troff2
- END_OF_FILE
- if test 3082 -ne `wc -c <'MANIFEST'`; then
- echo shar: \"'MANIFEST'\" unpacked with wrong size!
- fi
- # end of 'MANIFEST'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(11311 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- X README 1.8 89/08/29
- X
- XNormal UNIX troff only prints its output on WANG C/A/T Phototypesetters.
- XThis package contains a generic interface between standard troff and
- Xother types of printers. The package has a driver for PostScript printers
- X(Eg: Apple Laserwriters), a partial implementation of a driver for HP
- XLaserjet family printers, and a Ditroff output option.
- X
- XIn fact, this package can be used to, in effect, upgrade CAT troff
- Xto be ditroff. There are limitations, but you get what you pay for.
- X
- XI had announced more than once that this was being shipped to
- Xcomp.sources.unix, but something new kept coming up. I had sent
- Xthe last incarnation to Rich Salz, then I discovered tpscript and
- Xdecided to include a little stuff from that to make mine more
- Xcomplete - so I asked him to cancel. A couple of months ago, a new
- Xversion was sent off to him, but it hasn't appeared yet.
- X
- XApplicability:
- X - You must have CAT troff, not ditroff.
- X - Printers:
- X - if you have a laserjet, you should be able to use this
- X package. However, if you can get a copy of jetroff,
- X you can use psroff to convert to ditroff output, and
- X then use jetroff to print that - until font downloading
- X is in my HPLJ driver, jetroff will be much better than
- X my stuff.
- X - if you have a postscript printer use postscript output.
- X Or, generate ditroff and use tpscript. Output is more
- X or less identical.
- X - if you have ditroff backends, then use ditroff.
- X
- XThis is an ALPHA release. What this means is that this thing is good
- Xenough for use, but there are rough edges. I would encourage people to
- Xfiddle with it (particularly the mapping tables) and PLEASE PLEASE PLEASE
- Xsend me your changes so that I can encorporate them into new releases and
- Xupdates. This package, along with some tweaks to troff are currently
- Xin production at our site.
- X
- XCredit where credit's due: genftable.ps, font/* and some of the character
- Xdrawing and spacing stuff (bracket font) is from ditroff2ps/tpscript:
- X
- X Copyright: 1985, Stephen Frede, UNSW Australia
- X Use it and copy it as much as you want, but don't pretend you
- X wrote it, or sell it for profit.
- X
- XExcellent stuff.
- X
- X Remarks:
- X - This was developed with a relatively old (eg: V7) troff, and
- X may be missing some of the special characters ("\(XX" sequences)
- X that later versions of troff have. Entries for these characters
- X can be found in the ps.c file, (standardFont and symbolFont arrays)
- X as "NOCODE"/"unassigned" entries. Ditto ljtables.c
- X Please let me know what they are if you figger them out.
- X Note that the X & Y shifts shown in these tables are:
- X 1) in the native resolution of the device (1/72's for troff2ps,
- X 1/720's for troff2lj) (not troff 1/432's).
- X 2) Are then *multiplied* by the current point size.
- X (eg: in troff2ps, .1 becomes .1*1/72*current point size
- X inches)
- X
- X - The PostScript driver is essentially complete. It uses the
- X built-in fonts on the AppleLaser. A few characters not in
- X these fonts are faked by the invocation of drawing routines
- X defined in the file "lib.ps" (which is the definitions of things
- X needed by the driver) Or the bracket font (also in lib.ps).
- X Eg: 1/2, 1/4, 3/4, circle, bell system logo and box are
- X constructed by PostScript subroutines and/or the bracket font. The
- X Bell System logo isn't really - try this:
- X \s36\(bs\s0
- X The first person to correctly identify what it is (without reading
- X lib.ps) gets a pat on the back ;-)
- X
- X The only two characters that don't exactly map properly are
- X left and right hand. I use double arrows instead. (so does
- X tpscript by the way - great minds think alike)
- X
- X - Regarding font width tables, there are several ways to go with
- X Postscript:
- X
- X showfont: modify showfont to have the appropriate command
- X to print to your printer. Typing:
- X showfont <fontname>
- X (eg: showfont Times-Roman) will dump the entire
- X Postscript Times-Roman font (plus some constructions
- X that troff2ps uses) in a table. Each character is
- X in a box, along with several numbers. The number
- X in the center at the bottom of the box is the width
- X you should put in your troff tables for that character.
- X
- X upload: modify it to have the appropriate command to print
- X to your printer. Then, arrange (somehow) to
- X capture in a file anything that the printer sends
- X *back* to the computer. (Eg: with stock System
- X V printer:
- X cat < /dev/<laserprinterdevice> > /tmp/upload&
- X
- X Run upload. /tmp/upload will then contain metrics
- X on all of the fonts in your printer.
- X dit2catwid.c: takes ditroff like font tables and converts them
- X to CAT codes suitable for (at least) Xenix troff.
- X genftable: fire it off to your Postscript printer, and it
- X will send back a shar file containing ditroff
- X style char tables. (Neat - thanks Michael!)
- X font/*: font tables for ditroff. (also thanks Michael!)
- X
- X - There is some code to allow the use of arbitrary commands to
- X the driver - see the .sR macro in tmac.t2, and troff2's
- X interpreter. This is *extremely* awkward to use (blame troff),
- X but can be useful after a fashion. Not documented particularly
- X well.... Our troff has been modified to emit a fake CAT code
- X with ".fp", so don't expect ".fp's" to work except by changing
- X fonts.?? However, you can do the same thing by using
- X
- X .sR "FnAB"
- X
- X where "F" is the font number (1-3 - don't redefine 4!) and
- X AB is the font name found in the proper lib.* file. ltest.m
- X has an example of the ".fp" version, change to the ".sR" version
- X to make it work on an unmodified troff.
- X
- X troff2 has 8-font troff support, but:
- X a) it's never been tested.
- X b) I'm no longer convinced that the cat.5 man page is
- X correct on how the decoding works.
- X
- X - The laserjet driver is pretty simple minded - it should position
- X each character correctly, and perform the font selections.
- X HOWEVER, it does not do font downloads. Therefore, if the desired
- X font doesn't exist, the laserjet will select some other font
- X according to its heuristics. In fact, I've not tested this
- X incarnation of the LJ driver much (because I don't have access to
- X one), but it should be very close to working this much. I am
- X thinking on a generic font downloading facility which will
- X take any format font file and download it to any printer style.
- X The current incarnation should work on all members of the
- X Laserjet. Font downloading will not work on "old Laserjets" unless
- X they've been upgraded to a plus. Further, the symbolFont table
- X has not been properly updated.
- X
- X Roadmap:
- X troff2.c: main function - performs the C/A/T translation
- X to function calls (via t2conf.c)
- X defs.h: General definitions.
- X t2conf.c: Table of functions for the two drivers. You can
- X add new drivers to this by appending to the
- X list. Please use the naming conventions I am
- X using.
- X utils.c: Routines used by other programs (eg: testps)
- X ps.h,ps.c: PostScript driver
- X lj.h,lj.c: Laserjet driver (including K incarnation)
- X ljtables.c: lj widths and adjustment table
- X dt.h,dt.c: Ditroff driver.
- X fonts.[ps|lj|dt] correspondance between troff name and method
- X of selection on the printer for Postscript, HPLJ,
- X and ditroff.
- X
- X All of the above are compiled and linked to create troff2ps.
- X Note: troff2ps examines the last two characters in the name it
- X is called with to determine which printer driver to use.
- X Therefore, invoking troff2ps as "troff2ps" will use the PostScript
- X driver. If you link troff2ps to "troff2lj", and run troff2lj,
- X it will emit Laserjet codes. Additionally, if you use the "-dxx"
- X option, troff2ps will use the "xx" driver. Eg: troff2ps -dlj
- X will print laserjet codes.
- X
- X Extra stuff:
- X Makefile: makes everything
- X lib.ps: PostScript library. Moved to LIBDIR/pslib by makefile.
- X prepended onto Postscript output by troff2ps.
- X confid.ps: Sample include file (actually produces a forms overlay)
- X lethead.ps: Ditto
- X lib.lj: Laserjet library. Moved to LIBDIR/ljlib by makefile.
- X Currently empty. prepended onto Laserjet output by
- X troff2lj.
- X ltest.m: Test document. Copied to ltest.m by Makefile.
- X chartab.m: another test document. (use tbl)
- X testps.c: PostScript driver tester.
- X testps <fonts>
- X will display postscript on standard output to show
- X the characters in the <fonts> list, where each
- X character is A thru O. See ps.c for the font names.
- X At the end, testps will always display a page of
- X ZapfDingbats.
- X testps AB will display two pages of Times-Roman,
- X two pages of Times-Italic along with a page of
- X ZapfDingbats.
- X "testps -" will display only the ZapfDingbats.
- X "testps" will display oodles of stuff.
- X psroff.sh: Driver to wrap around troff to invoke the translators.
- X Final result put in BINDIR/psroff, possibly linked
- X to BINDIR/ljroff etc.
- X psxlate.c: (Incomplete) PostScript postfilter. It will currently
- X reverse page order and is called by psroff (according
- X to "OUTPUT" definition in Makefile).
- X No manual page yet (it's not complete).
- X tmac.t2.sh: Some useful extensions on mm - invokes mm package.
- X Copied to tmac.t2 by Makefile. Intended to
- X eventually have some driver-specific tuning.
- X You would use it as "psroff -mt2 ...." instead
- X of "nroff -mm ...".
- X You really should customize this. Note that the
- X ".sR" facility will not work without the definition
- X contained herein.
- X fonts.ps: List of troff ".fp" font name to Laserwriter font
- X name translations. Note: stock troff cannot make
- X use of .fp changes because the stupid thing doesn't
- X tell the back end that the font has changed. Please
- X contact me and I can send you a couple of changes
- X to make to troff (if you have source).
- X fonts.lj/lk: ditto for Laserjet
- X psroff.1.sh: Manual page. Copied to psroff.1 by Makefile
- X troff2ps.1.sh: Manual page. Copied to psroff.1 by Makefile
- X
- XInstructions for building:
- X - edit Makefile and change:
- X LIBDIR Where the non-user accessible stuff should go.
- X INDIR Where the user-accessible stuff should go.
- X PSOUTPUT Output command to print PostScript stuff.
- X LJOUTPUT Output command to print Laserjet stuff.
- X DTOUTPUT Output command to print Ditroff stuff.
- X - edit defs.h and define either BSD or ATT. If you set ATT, set
- X SVR3 too if you are running SVR3.
- X - Type
- X make
- X This will build everything.
- X make install
- X Will install everything, including the new font width tables.
- X You can even issue this from a non-root user, but it will prompt
- X you for the password on every thing it needs to do as root.
- X If you want "ljroff", you will have to manually link INDIR/psroff
- X to INDIR/ljroff. Ditto lkroff and dttroff.
- X
- X
- XPLEASE PLEASE PLEASE! If you have any problems with it, or would like
- Xto make some suggestions for changing it, or have implemented a new driver
- X(hint hint) please contact me at:
- X---------------------------------
- XChris Lewis, R.H. Lathwell & Associates: Elegant Communications Inc.
- XUUCP: {uunet!attcan, utcsri!utzoo, utai}!lsuc!ecicrl!clewis
- XUUCP: {uunet!attcan, utcsri!utzoo, utai}!lsuc!gate!eci386!clewis
- XPhone: (416)-595-5425
- END_OF_FILE
- if test 11311 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- chmod +x 'README'
- # end of 'README'
- fi
- if test -f 'confid.ps' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'confid.ps'\"
- else
- echo shar: Extracting \"'confid.ps'\" \(628 characters\)
- sed "s/^X//" >'confid.ps' <<'END_OF_FILE'
- X% Copyright 1985, 1986, 1987, 1988 Chris Lewis
- X% All Rights Reserved
- X%
- X% Permission to copy and further distribute is freely given provided
- X% this copyright notice remains intact and that this software is not
- X% sold for profit.
- X%
- X% Project: Generic Troff drivers
- X% Module: pslib.sh
- X% Author: Chris Lewis
- X% Specs: Confidential overlay inclusion.
- X%ident @(#)pslib.sh: 1.2 Copyright 89/04/21 11:48:20 Chris Lewis"
- X
- X/Confidential {
- X gsave
- X .99 setgray
- X /Courier-Bold findfont 80 scalefont setfont
- X 0 0 moveto
- X 54 rotate
- X 0 -80 rmoveto
- X 1 2 scale
- X ( ECI:Confidential) show
- X grestore
- X} def
- END_OF_FILE
- if test 628 -ne `wc -c <'confid.ps'`; then
- echo shar: \"'confid.ps'\" unpacked with wrong size!
- fi
- # end of 'confid.ps'
- fi
- if test -f 'dt.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'dt.h'\"
- else
- echo shar: Extracting \"'dt.h'\" \(1257 characters\)
- sed "s/^X//" >'dt.h' <<'END_OF_FILE'
- X/* Copyright 1985, 1986, 1987, 1988 Chris Lewis
- X All Rights Reserved
- X
- X Permission to copy and further distribute is freely given provided
- X this copyright notice remains intact and that this software is not
- X sold for profit.
- X
- X Project: Generic Troff drivers
- X Module: dt.h
- X Author: Chris Lewis
- X Specs: Ditroff driver definitions
- X Hacked from ps.h
- X */
- X
- X#ifndef SVR3
- X#ifndef lint
- Xstatic char dtID[] = "@(#)dt.h: 1.1 Copyright 89/06/14 17:40:54 Chris Lewis";
- X#endif
- X#else
- X#ident "@(#)dt.h: 1.1 Copyright 89/06/14 17:40:54 Chris Lewis"
- X#endif
- X
- X/* This is actually done in the back-end */
- X#define DTRESOLUTION 432
- X/* Length scaling factor */
- X#define DTSCALEFACTOR ((double) DTRESOLUTION / TROFFRESOLUTION)
- X/* Troff assumes 7.5" paper width, most macro packages print in
- X 6.5" area within that. Sooo, we'll center the paperwidth on the
- X physical page - implying .5" inch physical margins.*/
- X#define TROFF2DTX(x) ((x) * DTSCALEFACTOR + DTRESOLUTION / 2)
- X/* 11" paper length */
- X#define TROFF2DTY(y) ((y) * DTSCALEFACTOR)
- X
- Xextern double pagelength;
- X
- X#define DTLIB "lib"
- X#define DTFONTS "fonts"
- X
- Xextern int dtProlog(), dtEpilog(), dtChar(), dtPage(), dtFontSel();
- X
- X#define DTNAME "dt"
- X
- X#ifdef DT
- Xstruct troff2befont dtSymFont[], dtStdFont[];
- X#endif
- END_OF_FILE
- if test 1257 -ne `wc -c <'dt.h'`; then
- echo shar: \"'dt.h'\" unpacked with wrong size!
- fi
- # end of 'dt.h'
- fi
- if test ! -d 'font' ; then
- echo shar: Creating directory \"'font'\"
- mkdir 'font'
- fi
- if test -f 'font/C' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'font/C'\"
- else
- echo shar: Extracting \"'font/C'\" \(2660 characters\)
- sed "s/^X//" >'font/C' <<'END_OF_FILE'
- X# Courier
- Xname C
- Xinternalname Courier
- X# fixed width
- Xspacewidth 60
- Xcharset
- X! 60 2 041
- X" 60 2 042
- X# 60 3 043
- X$ 60 3 044
- X% 60 2 045
- X& 60 2 046
- X' 60 2 047
- X( 60 3 050
- X) 60 3 051
- X* 60 2 052
- X+ 60 2 053
- X, 60 1 054
- X- 60 0 055
- Xhy "
- X. 60 0 056
- X/ 60 3 057
- Xsl "
- X0 60 2 060
- X1 60 2 061
- X2 60 2 062
- X3 60 2 063
- X4 60 2 064
- X5 60 2 065
- X6 60 2 066
- X7 60 2 067
- X8 60 2 070
- X9 60 2 071
- X: 60 0 072
- X; 60 1 073
- X< 60 2 074
- X= 60 0 075
- X> 60 2 076
- X? 60 2 077
- X@ 60 3 0100
- XA 60 2 0101
- XB 60 2 0102
- XC 60 2 0103
- XD 60 2 0104
- XE 60 2 0105
- XF 60 2 0106
- XG 60 2 0107
- XH 60 2 0110
- XI 60 2 0111
- XJ 60 2 0112
- XK 60 2 0113
- XL 60 2 0114
- XM 60 2 0115
- XN 60 2 0116
- XO 60 2 0117
- XP 60 2 0120
- XQ 60 3 0121
- XR 60 2 0122
- XS 60 2 0123
- XT 60 2 0124
- XU 60 2 0125
- XV 60 2 0126
- XW 60 2 0127
- XX 60 2 0130
- XY 60 2 0131
- XZ 60 2 0132
- X[ 60 3 0133
- X\ 60 3 0134
- X] 60 3 0135
- Xa^ 60 2 0136 asciicircum
- X_ 60 1 0137
- Xru "
- X` 60 2 0140
- Xa 60 0 0141
- Xb 60 2 0142
- Xc 60 0 0143
- Xd 60 2 0144
- Xe 60 0 0145
- Xf 60 2 0146
- Xg 60 1 0147
- Xh 60 2 0150
- Xi 60 2 0151
- Xj 60 3 0152
- Xk 60 2 0153
- Xl 60 2 0154
- Xm 60 0 0155
- Xn 60 0 0156
- Xo 60 0 0157
- Xp 60 1 0160
- Xq 60 1 0161
- Xr 60 0 0162
- Xs 60 0 0163
- Xt 60 2 0164
- Xu 60 0 0165
- Xv 60 0 0166
- Xw 60 0 0167
- Xx 60 0 0170
- Xy 60 1 0171
- Xz 60 0 0172
- X{ 60 3 0173
- X| 60 3 0174
- X} 60 3 0175
- Xa~ 60 0 0176 asciitilde
- XI! 60 1 0241 exclamdown
- Xct 60 2 0242 cent
- Xpo 60 2 0243 sterling
- X$J 60 2 0245 yen
- Xsc 60 3 0247 section
- Xfm 60 2 0251 quotesingle
- Xn' "
- Xlq 60 2 0252 quotedblleft
- Xd< 60 0 0253 guillemotleft
- Xl< 60 0 0254 guilsinglleft
- Xr> 60 0 0255 guilsinglright
- X\- 60 0 0261 endash
- Xdg 60 3 0262 dagger
- Xdd 60 3 0263 daggerdbl
- Xpp 60 3 0266 paragraph
- Xbu 60 0 0267 bullet
- Xbq 60 2 0271 quotedblbase
- Xrq 60 2 0272 quotedblright
- Xd> 60 0 0273 guillemotright
- XI? 60 1 0277 questiondown
- Xga 60 2 0301 grave
- X\` "
- Xaa 60 2 0302 acute
- X\' "
- X^ 60 2 0303 circumflex
- X~ 60 2 0304 tilde
- Xma 60 2 0305 macron
- Xbe 60 2 0306 breve
- Xdt 60 2 0307 dotaccent
- X.. 60 2 0310 dieresis
- Xum "
- Xri 60 2 0312 ring
- Xcd 60 1 0313 cedilla
- X'' 60 2 0315 hungarumlaut
- Xog 60 1 0316 ogonek
- Xhc 60 2 0317 caron
- Xem 60 0 0320 emdash
- Xa: 60 2 0321 adieresis
- Xo: 60 2 0322 odieresis
- Xu: 60 2 0323 udieresis
- XA: 60 2 0324 Adieresis
- XO: 60 2 0325 Odieresis
- XU: 60 2 0326 Udieresis
- XPL 60 2 0350 Lslash
- XO/ 60 2 0351 Oslash
- Xui 60 0 0365 dotlessi
- XPl 60 2 0370 lslash
- Xo/ 60 2 0371 oslash
- Xss 60 2 0373 germandbls
- X12 120 2 0100 1/2 faked - code is irrelevent
- X13 120 2 0100 1/3 faked - code is irrelevent
- X14 120 2 0100 1/4 faked - code is irrelevent
- X18 120 2 0100 1/8 faked - code is irrelevent
- X23 120 2 0100 2/3 faked - code is irrelevent
- X34 120 2 0100 3/4 faked - code is irrelevent
- X38 120 2 0100 3/8 faked - code is irrelevent
- X58 120 2 0100 5/8 faked - code is irrelevent
- X78 120 2 0100 7/8 faked - code is irrelevent
- Xsq 100 3 0100 square box
- END_OF_FILE
- if test 2660 -ne `wc -c <'font/C'`; then
- echo shar: \"'font/C'\" unpacked with wrong size!
- fi
- # end of 'font/C'
- fi
- if test -f 'font/CB' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'font/CB'\"
- else
- echo shar: Extracting \"'font/CB'\" \(2667 characters\)
- sed "s/^X//" >'font/CB' <<'END_OF_FILE'
- X# Courier-Bold
- Xname CB
- Xinternalname CourierB
- X# fixed width
- Xspacewidth 60
- Xcharset
- X! 60 2 041
- X" 60 2 042
- X# 60 3 043
- X$ 60 3 044
- X% 60 2 045
- X& 60 2 046
- X' 60 2 047
- X( 60 3 050
- X) 60 3 051
- X* 60 2 052
- X+ 60 2 053
- X, 60 1 054
- X- 60 0 055
- Xhy "
- X. 60 0 056
- X/ 60 3 057
- Xsl "
- X0 60 2 060
- X1 60 2 061
- X2 60 2 062
- X3 60 2 063
- X4 60 2 064
- X5 60 2 065
- X6 60 2 066
- X7 60 2 067
- X8 60 2 070
- X9 60 2 071
- X: 60 0 072
- X; 60 1 073
- X< 60 2 074
- X= 60 0 075
- X> 60 2 076
- X? 60 2 077
- X@ 60 3 0100
- XA 60 2 0101
- XB 60 2 0102
- XC 60 2 0103
- XD 60 2 0104
- XE 60 2 0105
- XF 60 2 0106
- XG 60 2 0107
- XH 60 2 0110
- XI 60 2 0111
- XJ 60 2 0112
- XK 60 2 0113
- XL 60 2 0114
- XM 60 2 0115
- XN 60 2 0116
- XO 60 2 0117
- XP 60 2 0120
- XQ 60 3 0121
- XR 60 2 0122
- XS 60 2 0123
- XT 60 2 0124
- XU 60 2 0125
- XV 60 2 0126
- XW 60 2 0127
- XX 60 2 0130
- XY 60 2 0131
- XZ 60 2 0132
- X[ 60 3 0133
- X\ 60 3 0134
- X] 60 3 0135
- Xa^ 60 2 0136 asciicircum
- X_ 60 1 0137
- Xru "
- X` 60 2 0140
- Xa 60 0 0141
- Xb 60 2 0142
- Xc 60 0 0143
- Xd 60 2 0144
- Xe 60 0 0145
- Xf 60 2 0146
- Xg 60 1 0147
- Xh 60 2 0150
- Xi 60 2 0151
- Xj 60 3 0152
- Xk 60 2 0153
- Xl 60 2 0154
- Xm 60 0 0155
- Xn 60 0 0156
- Xo 60 0 0157
- Xp 60 1 0160
- Xq 60 1 0161
- Xr 60 0 0162
- Xs 60 0 0163
- Xt 60 2 0164
- Xu 60 0 0165
- Xv 60 0 0166
- Xw 60 0 0167
- Xx 60 0 0170
- Xy 60 1 0171
- Xz 60 0 0172
- X{ 60 3 0173
- X| 60 3 0174
- X} 60 3 0175
- Xa~ 60 0 0176 asciitilde
- XI! 60 1 0241 exclamdown
- Xct 60 2 0242 cent
- Xpo 60 2 0243 sterling
- X$J 60 2 0245 yen
- Xsc 60 3 0247 section
- Xfm 60 2 0251 quotesingle
- Xn' "
- Xlq 60 2 0252 quotedblleft
- Xd< 60 0 0253 guillemotleft
- Xl< 60 0 0254 guilsinglleft
- Xr> 60 0 0255 guilsinglright
- X\- 60 0 0261 endash
- Xdg 60 3 0262 dagger
- Xdd 60 3 0263 daggerdbl
- Xpp 60 3 0266 paragraph
- Xbu 60 0 0267 bullet
- Xbq 60 2 0271 quotedblbase
- Xrq 60 2 0272 quotedblright
- Xd> 60 0 0273 guillemotright
- XI? 60 1 0277 questiondown
- Xga 60 2 0301 grave
- X\` "
- Xaa 60 2 0302 acute
- X\' "
- X^ 60 2 0303 circumflex
- X~ 60 2 0304 tilde
- Xma 60 2 0305 macron
- Xbe 60 2 0306 breve
- Xdt 60 2 0307 dotaccent
- X.. 60 2 0310 dieresis
- Xum "
- Xri 60 2 0312 ring
- Xcd 60 1 0313 cedilla
- X'' 60 2 0315 hungarumlaut
- Xog 60 1 0316 ogonek
- Xhc 60 2 0317 caron
- Xem 60 0 0320 emdash
- Xa: 60 2 0321 adieresis
- Xo: 60 2 0322 odieresis
- Xu: 60 2 0323 udieresis
- XA: 60 2 0324 Adieresis
- XO: 60 2 0325 Odieresis
- XU: 60 2 0326 Udieresis
- XPL 60 2 0350 Lslash
- XO/ 60 3 0351 Oslash
- Xui 60 0 0365 dotlessi
- XPl 60 2 0370 lslash
- Xo/ 60 3 0371 oslash
- Xss 60 2 0373 germandbls
- X12 120 2 0100 1/2 faked - code is irrelevent
- X13 120 2 0100 1/3 faked - code is irrelevent
- X14 120 2 0100 1/4 faked - code is irrelevent
- X18 120 2 0100 1/8 faked - code is irrelevent
- X23 120 2 0100 2/3 faked - code is irrelevent
- X34 120 2 0100 3/4 faked - code is irrelevent
- X38 120 2 0100 3/8 faked - code is irrelevent
- X58 120 2 0100 5/8 faked - code is irrelevent
- X78 120 2 0100 7/8 faked - code is irrelevent
- Xsq 100 3 0100 square box
- END_OF_FILE
- if test 2667 -ne `wc -c <'font/CB'`; then
- echo shar: \"'font/CB'\" unpacked with wrong size!
- fi
- # end of 'font/CB'
- fi
- if test -f 'font/CO' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'font/CO'\"
- else
- echo shar: Extracting \"'font/CO'\" \(2670 characters\)
- sed "s/^X//" >'font/CO' <<'END_OF_FILE'
- X# Courier-Oblique
- Xname CO
- Xinternalname CourierO
- X# fixed width
- Xspacewidth 60
- Xcharset
- X! 60 2 041
- X" 60 2 042
- X# 60 3 043
- X$ 60 3 044
- X% 60 2 045
- X& 60 2 046
- X' 60 2 047
- X( 60 3 050
- X) 60 3 051
- X* 60 2 052
- X+ 60 2 053
- X, 60 1 054
- X- 60 0 055
- Xhy "
- X. 60 0 056
- X/ 60 3 057
- Xsl "
- X0 60 2 060
- X1 60 2 061
- X2 60 2 062
- X3 60 2 063
- X4 60 2 064
- X5 60 2 065
- X6 60 2 066
- X7 60 2 067
- X8 60 2 070
- X9 60 2 071
- X: 60 0 072
- X; 60 1 073
- X< 60 2 074
- X= 60 0 075
- X> 60 2 076
- X? 60 2 077
- X@ 60 3 0100
- XA 60 2 0101
- XB 60 2 0102
- XC 60 2 0103
- XD 60 2 0104
- XE 60 2 0105
- XF 60 2 0106
- XG 60 2 0107
- XH 60 2 0110
- XI 60 2 0111
- XJ 60 2 0112
- XK 60 2 0113
- XL 60 2 0114
- XM 60 2 0115
- XN 60 2 0116
- XO 60 2 0117
- XP 60 2 0120
- XQ 60 3 0121
- XR 60 2 0122
- XS 60 2 0123
- XT 60 2 0124
- XU 60 2 0125
- XV 60 2 0126
- XW 60 2 0127
- XX 60 2 0130
- XY 60 2 0131
- XZ 60 2 0132
- X[ 60 3 0133
- X\ 60 3 0134
- X] 60 3 0135
- Xa^ 60 2 0136 asciicircum
- X_ 60 1 0137
- Xru "
- X` 60 2 0140
- Xa 60 0 0141
- Xb 60 2 0142
- Xc 60 0 0143
- Xd 60 2 0144
- Xe 60 0 0145
- Xf 60 2 0146
- Xg 60 1 0147
- Xh 60 2 0150
- Xi 60 2 0151
- Xj 60 3 0152
- Xk 60 2 0153
- Xl 60 2 0154
- Xm 60 0 0155
- Xn 60 0 0156
- Xo 60 0 0157
- Xp 60 1 0160
- Xq 60 1 0161
- Xr 60 0 0162
- Xs 60 0 0163
- Xt 60 2 0164
- Xu 60 0 0165
- Xv 60 0 0166
- Xw 60 0 0167
- Xx 60 0 0170
- Xy 60 1 0171
- Xz 60 0 0172
- X{ 60 3 0173
- X| 60 3 0174
- X} 60 3 0175
- Xa~ 60 0 0176 asciitilde
- XI! 60 1 0241 exclamdown
- Xct 60 2 0242 cent
- Xpo 60 2 0243 sterling
- X$J 60 2 0245 yen
- Xsc 60 3 0247 section
- Xfm 60 2 0251 quotesingle
- Xn' "
- Xlq 60 2 0252 quotedblleft
- Xd< 60 0 0253 guillemotleft
- Xl< 60 0 0254 guilsinglleft
- Xr> 60 0 0255 guilsinglright
- X\- 60 0 0261 endash
- Xdg 60 3 0262 dagger
- Xdd 60 3 0263 daggerdbl
- Xpp 60 3 0266 paragraph
- Xbu 60 0 0267 bullet
- Xbq 60 2 0271 quotedblbase
- Xrq 60 2 0272 quotedblright
- Xd> 60 0 0273 guillemotright
- XI? 60 1 0277 questiondown
- Xga 60 2 0301 grave
- X\` "
- Xaa 60 2 0302 acute
- X\' "
- X^ 60 2 0303 circumflex
- X~ 60 2 0304 tilde
- Xma 60 2 0305 macron
- Xbe 60 2 0306 breve
- Xdt 60 2 0307 dotaccent
- X.. 60 2 0310 dieresis
- Xum "
- Xri 60 2 0312 ring
- Xcd 60 1 0313 cedilla
- X'' 60 2 0315 hungarumlaut
- Xog 60 1 0316 ogonek
- Xhc 60 2 0317 caron
- Xem 60 0 0320 emdash
- Xa: 60 2 0321 adieresis
- Xo: 60 2 0322 odieresis
- Xu: 60 2 0323 udieresis
- XA: 60 2 0324 Adieresis
- XO: 60 2 0325 Odieresis
- XU: 60 2 0326 Udieresis
- XPL 60 2 0350 Lslash
- XO/ 60 2 0351 Oslash
- Xui 60 0 0365 dotlessi
- XPl 60 2 0370 lslash
- Xo/ 60 2 0371 oslash
- Xss 60 2 0373 germandbls
- X12 120 2 0100 1/2 faked - code is irrelevent
- X13 120 2 0100 1/3 faked - code is irrelevent
- X14 120 2 0100 1/4 faked - code is irrelevent
- X18 120 2 0100 1/8 faked - code is irrelevent
- X23 120 2 0100 2/3 faked - code is irrelevent
- X34 120 2 0100 3/4 faked - code is irrelevent
- X38 120 2 0100 3/8 faked - code is irrelevent
- X58 120 2 0100 5/8 faked - code is irrelevent
- X78 120 2 0100 7/8 faked - code is irrelevent
- Xsq 100 3 0100 square box
- END_OF_FILE
- if test 2670 -ne `wc -c <'font/CO'`; then
- echo shar: \"'font/CO'\" unpacked with wrong size!
- fi
- # end of 'font/CO'
- fi
- if test -f 'font/S2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'font/S2'\"
- else
- echo shar: Extracting \"'font/S2'\" \(856 characters\)
- sed "s/^X//" >'font/S2' <<'END_OF_FILE'
- X# "Symbol"
- Xname S2
- Xinternalname BracketFont
- Xspecial
- Xcharset
- Xbv 50 2 0101 bold vertical
- Xlt 50 2 0102 left top of big curly bracket
- Xlk 50 2 0103 left centre of big curly bracket
- Xlb 50 2 0104 left bottom of big curly bracket
- Xrt 50 2 0105 right top of big curly bracket
- Xrk 50 2 0106 right centre of big curly bracket
- Xrb 50 2 0107 right bottom of big curly bracket
- Xlc 50 2 0110 left ceiling (left top of big square bracket)
- Xlf 50 2 0111 left floor (left bottom of big square bracket)
- Xrc 50 2 0112 right ceiling (right top of big square bracket)
- Xrf 50 2 0113 right floor (right bottom of big square bracket)
- Xbr 0 2 0114 box vertical rule (matches ul)
- Xrn 50 2 0115 root en extender
- Xci 100 3 0116 circle
- X\| 17 0 0117 1/6em narrow space
- X\^ 8 0 0120 1/12 em narrow space
- Xr1 80 0 0121 reversible reaction ( chemical )
- Xr2 80 0 0122 reversible reaction - 2 full arrows
- END_OF_FILE
- if test 856 -ne `wc -c <'font/S2'`; then
- echo shar: \"'font/S2'\" unpacked with wrong size!
- fi
- # end of 'font/S2'
- fi
- if test -f 'fonts.dt' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fonts.dt'\"
- else
- echo shar: Extracting \"'fonts.dt'\" \(632 characters\)
- sed "s/^X//" >'fonts.dt' <<'END_OF_FILE'
- X#@(#)fonts.dt 1.1 89/06/14
- X# DO NOT CHANGE THE ORDER OF THE FIRST FOUR LINES - THESE ARE
- X# THE DEFAULT TROFF FONTS IN POSITIONS 1-4. IN PARTICULAR, IF
- X# SYMBOL ISN'T THE FOURTH ENTRY, BOXES, TABLES, AND OTHER FANCY
- X# CHARACTERS DON'T WORK SHIT.
- XR Times-Roman
- XI Times-Italic
- XB Times-Bold
- XS Symbol
- XBI Times-BoldItalic
- XH Helvetica
- XHI Helvetica-Oblique
- XHB Helvetica-Bold
- XHo Helvetica-BoldOblique
- XCW Courier
- XZC ZapfChancery-MediumItalic
- XA AvantGarde-Book
- XAI AvantGarde-BookOblique
- XAB AvantGarde-Demi
- XAi AvantGarde-DemiItalic
- XAP APL
- Xh Helvetica-Narrow
- Xhi Helvetica-Narrow-Oblique
- Xhb Helvetica-Narrow-Bold
- XhI Helvetica-Narrow-BoldOblique
- END_OF_FILE
- if test 632 -ne `wc -c <'fonts.dt'`; then
- echo shar: \"'fonts.dt'\" unpacked with wrong size!
- fi
- # end of 'fonts.dt'
- fi
- if test -f 'fonts.lj' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fonts.lj'\"
- else
- echo shar: Extracting \"'fonts.lj'\" \(1341 characters\)
- sed "s/^X//" >'fonts.lj' <<'END_OF_FILE'
- X#@(#)fonts.lj 1.1 89/05/02
- X# four fields:
- X# troff-name english-name HPLJ-code-to-transmit flags
- X# flags of interest: 02 indicates that it's a built-in font.
- X# \nnn sequences are only recognized in the HPLJ-code field.
- X# Don't put in *any* extraneous spaces.
- X# +----------------------------- Symbol set
- X# | +---------------------- 0=fixed, 1=proportional
- X# | | +-------------------- 0=upright, 1=italics
- X# | | | +----------------- stroke weight -7...7
- X# | | | | +-------------- Typeface
- X# | | | | |
- X# | | | | | +----------- 2 == builtin
- X# | | | | | |
- X# v v v v v v
- XR Times-Roman \033(8U\033(s1p0s00b05T 2
- XI Times-Italic \033(8U\033(s1p1s-3b05T 2
- XB Times-Bold \033(8U\033(s1p0s03b05T 2
- XS Symbol \033(8U\033(s0p0s00b03T 2
- XBI Times-BoldItalic \033(8U\033(s1p1s03b05T 2
- XCW Courier \033(8U\033(s0p0s00b03T 2
- XCI Courier-Italic \033(8U\033(s0p1s-3b03T 2
- XCB Courier-Bold \033(8U\033(s0p0s03b03T 2
- XL LinePrinter \033(8U\033(s0p0s00b00T 2
- XLI LinePrinter-Ital \033(8U\033(s0p1s-3b00T 2
- XLB LinePrinter-Bold \033(8U\033(s0p0s03b00T 2
- END_OF_FILE
- if test 1341 -ne `wc -c <'fonts.lj'`; then
- echo shar: \"'fonts.lj'\" unpacked with wrong size!
- fi
- # end of 'fonts.lj'
- fi
- if test -f 'fonts.ps' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fonts.ps'\"
- else
- echo shar: Extracting \"'fonts.ps'\" \(669 characters\)
- sed "s/^X//" >'fonts.ps' <<'END_OF_FILE'
- X#@(#)fonts.ps 1.9 89/08/22
- X# DO NOT CHANGE THE ORDER OF THE FIRST FOUR LINES - THESE ARE
- X# THE DEFAULT TROFF FONTS IN POSITIONS 1-5. IN PARTICULAR, IF
- X# SYMBOL ISN'T THE FOURTH ENTRY AND BRACKETFONT ISN'T THE FIFTH,
- X# BOXES, TABLES, AND OTHER FANCY CHARACTERS DON'T WORK SHIT.
- X# Don't try to directly reference font 5.....
- X
- XR Times-Roman
- XI Times-Italic
- XB Times-Bold
- XS Symbol
- X.. BracketFont
- XBB Bookman-Demi
- XBI Times-BoldItalic
- XBO Bookman-LightItalic
- XBR Bookman-Light
- XBX Bookman-DemiItalic
- XC Courier
- XCB Courier-Bold
- XCO Courier-Oblique
- XCX Courier-BoldOblique
- XH Helvetica
- XHB Helvetica-Bold
- XHO Helvetica-Oblique
- XHX Helvetica-BoldOblique
- XPA Palatino-Roman
- XPB Palatino-Bold
- END_OF_FILE
- if test 669 -ne `wc -c <'fonts.ps'`; then
- echo shar: \"'fonts.ps'\" unpacked with wrong size!
- fi
- # end of 'fonts.ps'
- fi
- if test -f 'gfnttab.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gfnttab.sh'\"
- else
- echo shar: Extracting \"'gfnttab.sh'\" \(612 characters\)
- sed "s/^X//" >'gfnttab.sh' <<'END_OF_FILE'
- X:
- X# 1.2 89/08/25
- Xtrap "exit 1" 0 1 2 3 15
- Xif [ ! -d /usr/lib/oldfonts ]
- Xthen
- X if mkdir /usr/lib/oldfonts
- X then
- X :
- X else
- X exit 1
- X fi
- X cp /usr/lib/font/* /usr/lib/oldfonts
- Xfi
- Xset -e
- Xrm -f /tmp/S
- Xcp font/S /tmp/S
- Xchmod 644 /tmp/S
- Xsed -e '1,/charset/d' font/S2 >> /tmp/S
- Xfor i in font/[A-Z]*
- Xdo
- X case $i in
- X font/S)
- X echo "Generating font S"
- X ./dit2catwid -s /tmp/S font/R font/ftS
- X ;;
- X font/S2)
- X continue
- X ;;
- X *)
- X echo "Generating font `basename $i`"
- X ./dit2catwid /tmp/S $i font/ft`basename $i`
- X ;;
- X esac
- Xdone
- Xset -ex
- Xmv font/ft* /usr/lib/font
- Xtrap "" 0
- Xexit 0
- END_OF_FILE
- if test 612 -ne `wc -c <'gfnttab.sh'`; then
- echo shar: \"'gfnttab.sh'\" unpacked with wrong size!
- fi
- # end of 'gfnttab.sh'
- fi
- if test -f 'lethead.ps' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lethead.ps'\"
- else
- echo shar: Extracting \"'lethead.ps'\" \(976 characters\)
- sed "s/^X//" >'lethead.ps' <<'END_OF_FILE'
- X% Copyright 1985, 1986, 1987, 1988 R.H. Lathwell Associates:
- X% Elegant Communications Inc. All Rights Reserved
- X%
- X% Permission to copy and further distribute is freely given provided
- X% this copyright notice remains intact and that this software is not
- X% sold for profit.
- X%
- X% Project: Generic Troff drivers
- X% Module: lhead.ps.sh
- X% Author: Chris Lewis
- X% Specs: LetterHead overlay inclusion.
- X%ident @(#)lhead.ps.sh: 1.3 Copyright 89/04/21 11:47:29 Chris Lewis"
- X
- X/LetterHead {
- X /Logosave save def
- X matrix currentmatrix setmatrix 180 740 translate
- X % Box
- X newpath 0 12 moveto 0 32 rlineto 250 0 rlineto 0 -32 rlineto closepath fill
- X % Type in box
- X /Helvetica findfont 16 scalefont setfont
- X 9 17 moveto 1 setgray (R.H. LATHWELL ASSOCIATES:)show
- X % Type below box.
- X /Helvetica findfont 12 scalefont setfont
- X 25 0 moveto 0 setgray (ELEGANT COMMUNICATIONS, INC.)show
- X % Underline.
- X -162 -4 moveto 630 0 rlineto stroke
- X Logosave restore
- X} def
- END_OF_FILE
- if test 976 -ne `wc -c <'lethead.ps'`; then
- echo shar: \"'lethead.ps'\" unpacked with wrong size!
- fi
- # end of 'lethead.ps'
- fi
- if test -f 'lib.dt' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lib.dt'\"
- else
- echo shar: Extracting \"'lib.dt'\" \(448 characters\)
- sed "s/^X//" >'lib.dt' <<'END_OF_FILE'
- X% Copyright 1985, 1986, 1987, 1988 Chris Lewis
- X% All Rights Reserved
- X%
- X% Permission to copy and further distribute is freely given provided
- X% this copyright notice remains intact and that this software is not
- X% sold for profit.
- X%
- X% Project: Generic Troff drivers
- X% Module: lib.dt
- X% Author: Chris Lewis
- X% Specs: Predefinitions for Ditroff
- X%
- X%ident @(#)lib.dt: 1.1 Copyright 89/06/21 11:37:47 Chris Lewis"
- X%There is nothing here yet.
- END_OF_FILE
- if test 448 -ne `wc -c <'lib.dt'`; then
- echo shar: \"'lib.dt'\" unpacked with wrong size!
- fi
- # end of 'lib.dt'
- fi
- if test -f 'lib.lj' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lib.lj'\"
- else
- echo shar: Extracting \"'lib.lj'\" \(1151 characters\)
- sed "s/^X//" >'lib.lj' <<'END_OF_FILE'
- X% Copyright 1985, 1986, 1987, 1988 Chris Lewis
- X% All Rights Reserved
- X%
- X% Permission to copy and further distribute is freely given provided
- X% this copyright notice remains intact and that this software is not
- X% sold for profit.
- X%
- X% Project: Generic Troff drivers
- X% Module: lib.lj
- X% Author: Chris Lewis
- X% Specs: Predefinitions for HP Laserjet
- X% This is an ASCII file that is translated into
- X% binary by the lj driver. Using the following
- X% Escape conventions:
- X% %comment
- X% line from % to end of line ignored.
- X% \nnnnnn .....
- X% each group of 3 digits is interpreted as an
- X% octal bytes. Terminated by next non-octal
- X% character.
- X% \xnnnnnn ...
- X% Each group of 2 digits is interpreted as a
- X% hexidecimal byte. Terminated by next non-hex
- X% character.
- X% tabs, spaces and newlines are ignored (you have to
- X% use hex or octal to pass them).
- X% All others passed straight through.
- X% For example:
- X% \xAABB \022 A %hello
- X% Passes the following bytes: 0xAA, 0xBB, 022, and "A"
- X% through to the laserjet.
- X%ident @(#)lib.lj: 1.1 Copyright 89/05/02 17:34:07 Chris Lewis"
- X%There is nothing here yet.
- END_OF_FILE
- if test 1151 -ne `wc -c <'lib.lj'`; then
- echo shar: \"'lib.lj'\" unpacked with wrong size!
- fi
- # end of 'lib.lj'
- fi
- if test -f 'lib.lk' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lib.lk'\"
- else
- echo shar: Extracting \"'lib.lk'\" \(1151 characters\)
- sed "s/^X//" >'lib.lk' <<'END_OF_FILE'
- X% Copyright 1985, 1986, 1987, 1988 Chris Lewis
- X% All Rights Reserved
- X%
- X% Permission to copy and further distribute is freely given provided
- X% this copyright notice remains intact and that this software is not
- X% sold for profit.
- X%
- X% Project: Generic Troff drivers
- X% Module: lib.lk
- X% Author: Chris Lewis
- X% Specs: Predefinitions for HP Laserjet
- X% This is an ASCII file that is translated into
- X% binary by the lj driver. Using the following
- X% Escape conventions:
- X% %comment
- X% line from % to end of line ignored.
- X% \nnnnnn .....
- X% each group of 3 digits is interpreted as an
- X% octal bytes. Terminated by next non-octal
- X% character.
- X% \xnnnnnn ...
- X% Each group of 2 digits is interpreted as a
- X% hexidecimal byte. Terminated by next non-hex
- X% character.
- X% tabs, spaces and newlines are ignored (you have to
- X% use hex or octal to pass them).
- X% All others passed straight through.
- X% For example:
- X% \xAABB \022 A %hello
- X% Passes the following bytes: 0xAA, 0xBB, 022, and "A"
- X% through to the laserjet.
- X%ident @(#)lib.lk: 1.1 Copyright 89/05/02 17:34:12 Chris Lewis"
- X%There is nothing here yet.
- END_OF_FILE
- if test 1151 -ne `wc -c <'lib.lk'`; then
- echo shar: \"'lib.lk'\" unpacked with wrong size!
- fi
- # end of 'lib.lk'
- fi
- if test -f 'lj.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'lj.h'\"
- else
- echo shar: Extracting \"'lj.h'\" \(1352 characters\)
- sed "s/^X//" >'lj.h' <<'END_OF_FILE'
- X/* Copyright 1985, 1986, 1987, 1988 Chris Lewis
- X All Rights Reserved
- X
- X Permission to copy and further distribute is freely given provided
- X this copyright notice remains intact and that this software is not
- X sold for profit.
- X
- X Project: Generic Troff drivers
- X Module: lj.h
- X Author: Chris Lewis
- X Specs: Laserjet Driver definitions
- X Hacked from ps.h
- X */
- X
- X#ifndef SVR3
- X#ifndef lint
- Xstatic char ljID[] = "@(#)lj.h: 1.4 Copyright 89/04/21 11:47:35 Chris Lewis";
- X#endif
- X#else
- X#ident "@(#)lj.h: 1.4 Copyright 89/04/21 11:47:35 Chris Lewis"
- X#endif
- X
- X/* We're using decipoints */
- X#define LJRESOLUTION 720
- X/* Length scaling factor */
- X#define LJSCALEFACTOR ((double) LJRESOLUTION / TROFFRESOLUTION)
- X/* Troff assumes 7.5" paper width, most macro packages print in
- X 6.5" area within that. Sooo, we'll center the paperwidth on the
- X physical page - implying .5" inch physical margins.*/
- X#define TROFF2LJX(x) ((x) * LJSCALEFACTOR + LJRESOLUTION / 2)
- X/* 11" paper length */
- X#define TROFF2LJY(y) ((y) * LJSCALEFACTOR)
- X
- Xextern double pagelength;
- X
- X#define LASTLJFONT ('O')
- X
- X#define LJLIB "lib"
- X#define LJFONTS "fonts"
- X
- Xextern int ljProlog(), ljEpilog(), ljChar(), ljPage(), ljFontSel();
- X
- X#define LJNAME "lj"
- X#define LKNAME "lk"
- X
- X#ifdef LJ
- Xstruct troff2befont ljSymFont[], ljStdFont[];
- X#endif
- X#ifdef LK
- Xstruct troff2befont lkSymFont[], lkStdFont[];
- X#endif
- END_OF_FILE
- if test 1352 -ne `wc -c <'lj.h'`; then
- echo shar: \"'lj.h'\" unpacked with wrong size!
- fi
- # end of 'lj.h'
- fi
- if test -f 'ps.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ps.h'\"
- else
- echo shar: Extracting \"'ps.h'\" \(1405 characters\)
- sed "s/^X//" >'ps.h' <<'END_OF_FILE'
- X/* Copyright 1985, 1986, 1987, 1988 Chris Lewis
- X All Rights Reserved
- X
- X Permission to copy and further distribute is freely given provided
- X this copyright notice remains intact and that this software is not
- X sold for profit.
- X
- X Project: Generic Troff drivers
- X Module: ps.h
- X Author: Chris Lewis
- X Specs: PostScript Driver definitions
- X */
- X
- X#ifndef SVR3
- X#ifndef lint
- Xstatic char psID[] = "@(#)ps.h: 1.14 Copyright 89/04/21 11:47:53 Chris Lewis";
- X#endif
- X#else
- X#ident "@(#)ps.h: 1.14 Copyright 89/04/21 11:47:53 Chris Lewis"
- X#endif
- X
- X/* Points per inch (default PostScript resolution) */
- X#define PSRESOLUTION 72
- X/* Length scaling factor */
- X#define PSSCALEFACTOR ((double) PSRESOLUTION / TROFFRESOLUTION)
- X/* Troff assumes 7.5" paper width, most macro packages print in
- X 6.5" area within that. Sooo, we'll center the paperwidth on the
- X physical page - implying .5" inch physical margins.*/
- X#define TROFF2PSX(x) ((x) * PSSCALEFACTOR + PSRESOLUTION / 2)
- X/* 11" paper length (note the reversed sign!) */
- X#define TROFF2PSY(y) ((pagelength - (y)) * PSSCALEFACTOR)
- X
- Xextern double pagelength;
- X
- X#define LASTPSFONT ('O')
- X
- X#define FONTMACRO
- X
- X#define PSLIB "lib.ps"
- X#define PSFONTS "fonts.ps"
- X#define EMITPS printf
- X
- X/* Entry points: */
- Xextern int psProlog(), psEpilog(), psChar(), psPage(), psFontSel(),
- X psOverlay(), psXlate(), psBin();
- X
- X#define PSNAME "ps"
- X
- Xstruct troff2befont psSymFont[], psStdFont[];
- END_OF_FILE
- if test 1405 -ne `wc -c <'ps.h'`; then
- echo shar: \"'ps.h'\" unpacked with wrong size!
- fi
- # end of 'ps.h'
- fi
- if test -f 'psroff.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'psroff.1'\"
- else
- echo shar: Extracting \"'psroff.1'\" \(2522 characters\)
- sed "s/^X//" >'psroff.1' <<'END_OF_FILE'
- X.\"Copyright 1988 by Chris Lewis 1.3 89/05/18
- X.TH PSROFF 1 local
- X.SH NAME
- Xpsroff,ljroff,xxroff \- troff replacement for PostScript or HP Printers.
- X.SH SYNOPSIS
- X.IB xx roff
- X[-D] [-X]
- X.RI "[-d" xx "]"
- X.RI "[-rL" length "]"
- X.RI [ troffopts ] files ...
- X.SH DESCRIPTION
- X.I Psroff
- Xis functionally equivalent for
- X.I troff
- Xfor printing on PostScript or HP Laserjet printers.
- X.I Troffopts
- Xcan be any of the normal
- X.I troff
- Xarguments, in particular -m directives for specifying macro package.
- XNote that the semantics of "-t" are changed - it means send the Postscript
- X(or HP Laserjet) output to stdout.
- XThe "-X" option does a "set -x" for debugging.
- XThe "-D" option passes the "-D" option through to troff2ps.
- X.P
- X.I Psroff
- Xcan be made to generate several different printer output formats.
- XIt selects which one by one of two methods.
- XFirst,
- X.I psroff
- Xlooks at the first two characters in it's name for printer type.
- XThus, you can link "psroff" to "ljroff" - invocation of the latter will
- Xgenerate LaserJet codes.
- XAdditionally, you can override this by specifying
- Xthe
- X.RI -d xx
- Xoption, where
- X.I xx
- Xwill select which printer codes to generate.
- X.P
- X.I Psroff
- Xinvokes
- X.I troff
- Xto do the document formatting, then sends the output
- Xto
- X.I troff2ps
- Xto do the generation of the correct printer codes.
- X.P
- XSince
- X.I troff2ps
- Xrequires that it knows the page length, the "-rL" option should be
- Xused (see the documentation for MM and
- X.I troff2ps
- Xfor more details).
- X.SH BUGS
- XOld-fashioned CAT troff doesn't have a mechanism for passing arbitrary
- Xcommands to the CAT - eg: overlays, and physical font mounting etc.
- XIn order to support these things, a macro ".sR" was invented that
- Xpasses special directives to the back end by means of a magic pseudo
- XCAT code 'M', followed by an ASCII string containing the directive.
- XUnfortunately, the only way to get that to the back end from troff
- Xthat I have found so far is to embed the 'M<string>' in a ``.tm'' troff
- Xdirective.
- XThe ``.tm'' puts it's string to stderr, so psroff has been modified to
- Xmerge the stdout (CAT codes using -t option to troff) and stderr (.tm
- Xdirectives) together.
- X.P
- XUnfortunately, this means that you don't get to see troff-generated
- Xerrors except as "illegal flash" errors from troff2ps, or varying
- Xdegrees of extreme garbage on the printer.
- XIf you encounter mangled output, try running
- Xtroff instead of psroff, with the ``-t'' option, and direct stdout
- Xto /dev/null.
- XThen you will see troff's stderr.
- X.SH "SEE ALSO"
- Xtroff(1), troff2ps(1L), mm(5?)
- X.SH AUTHOR
- XWritten by Chris Lewis
- END_OF_FILE
- if test 2522 -ne `wc -c <'psroff.1'`; then
- echo shar: \"'psroff.1'\" unpacked with wrong size!
- fi
- # end of 'psroff.1'
- fi
- if test -f 'psroff.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'psroff.sh'\"
- else
- echo shar: Extracting \"'psroff.sh'\" \(1772 characters\)
- sed "s/^X//" >'psroff.sh' <<'END_OF_FILE'
- X:
- X# Copyright 1985, 1986, 1987, 1988 Chris Lewis
- X# All Rights Reserved
- X#
- X# Permission to copy and further distribute is freely given provided
- X# this copyright notice remains intact and that this software is not
- X# sold for profit.
- X#
- X# Project: Generic Troff drivers
- X# Module: psroff.sh
- X# Author: Chris Lewis
- X# Specs: troff driver
- X#
- X#ident "@(#)psroff.sh: 1.15 Copyright 89/07/14 14:47:46 Chris Lewis"
- Xterm=false
- Xtype=`basename $0 | sed -e 's/^\(..\).*/\1/'`
- Xcopies=1
- Xfor i in $*
- Xdo
- X case $i in
- X -X)
- X set -x
- X ;;
- X -t)
- X term=true
- X ;;
- X -T*)
- X device=`echo $i | sed -e 's/-T//'`
- X ;;
- X -d*)
- X type=`echo $i | sed -e 's/-d//'`
- X ;;
- X -n*)
- X copies=`echo $i | sed -e 's/-n//'`
- X ;;
- X -D | -m)
- X debug="$debug $i"
- X ;;
- X -)
- X files="$files $i"
- X ;;
- X -rL*)
- X eval `echo $i | sed -e 's/-rL\(..*\)\(.\)$/length=\1 prec=\2/'`
- X if [ -z "$length" -o -z "$prec" ]
- X then
- X echo "Bad length definition ($i) - must have value and scale" \
- X >&2
- X exit 1
- X fi
- X length="-l$length$prec"
- X args="$args $i"
- X ;;
- X -*)
- X args="$args $i"
- X ;;
- X *)
- X files="$files $i"
- X if [ ! -r $i ]
- X then
- X echo "$0: cannot open $i" >&2
- X exit 1
- X fi
- X ;;
- X esac
- Xdone
- X
- Xif [ -x troff2ps ]
- Xthen
- X t2=./troff2ps
- Xelse
- X t2=%%LIBDIR%%/troff2ps
- Xfi
- X
- X# If you add a driver, you will have to add it here too:
- Xcase $type in
- X lj | lk) OUTPUT="%%LJOUTPUT%%" ;;
- X ps) OUTPUT="%%PSOUTPUT%%" ;;
- X dt) OUTPUT="%%DTOUTPUT%%" ;;
- X *)
- X echo "$0: don't understand $type drivers" >&2
- X exit 1
- X ;;
- Xesac
- Xif $term
- Xthen
- X ( troff -t $args $files 2>&1 ) | $t2 $length -d$type $debug $device
- X exit $?
- Xelse
- X eval "( troff -t $args $files 2>&1 ) | $t2 $length -d$type $debug $device $OUTPUT"
- X exit $?
- Xfi
- END_OF_FILE
- if test 1772 -ne `wc -c <'psroff.sh'`; then
- echo shar: \"'psroff.sh'\" unpacked with wrong size!
- fi
- # end of 'psroff.sh'
- fi
- if test -f 't2conf.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'t2conf.c'\"
- else
- echo shar: Extracting \"'t2conf.c'\" \(1916 characters\)
- sed "s/^X//" >'t2conf.c' <<'END_OF_FILE'
- X/* Copyright 1985, 1986, 1987, 1988 Chris Lewis
- X All Rights Reserved
- X
- X Permission to copy and further distribute is freely given provided
- X this copyright notice remains intact and that this software is not
- X sold for profit.
- X
- X Project: Generic Troff drivers
- X Module: t2conf.c
- X Author: Chris Lewis
- X Specs: Switch for alternate backends.
- X */
- X
- X#include "defs.h"
- X
- X#ifndef SVR3
- X#ifndef lint
- Xstatic char SCCSid[] = "@(#)t2conf.c: 1.7 Copyright 89/06/14 17:39:52 Chris Lewis";
- X#endif
- X#else
- X#ident "@(#)t2conf.c: 1.7 Copyright 89/06/14 17:39:52 Chris Lewis"
- X#endif
- X
- X#ifdef PS
- X#include "ps.h"
- X#endif
- X
- X#if defined(LJ) || defined(LK)
- X#include "lj.h"
- X#endif
- X
- X#ifdef DT
- X#include "dt.h"
- X#endif
- X
- Xstruct backend B[] = {
- X/* bename, beprolog, beepilog, bechar, bepage, befontsel */
- X/* beoverlay, bebin bexlat, bestdfont, besymfont */
- X
- X#ifdef PS
- X { PSNAME, psProlog, psEpilog, psChar, psPage, psFontSel,
- X psOverlay, psBin, psXlate, psStdFont, psSymFont },
- X#endif
- X
- X#ifdef DT
- X { DTNAME, dtProlog, dtEpilog, dtChar, dtPage, dtFontSel,
- X NULL, NULL, NULL, dtStdFont, dtSymFont },
- X#endif
- X
- X#ifdef LJ
- X { LJNAME, ljProlog, ljEpilog, ljChar, ljPage, ljFontSel,
- X NULL, NULL, NULL, ljStdFont, ljSymFont },
- X#endif
- X#ifdef LK
- X { LKNAME, ljProlog, ljEpilog, ljChar, ljPage, ljFontSel,
- X NULL, NULL, NULL, lkStdFont, lkSymFont },
- X#endif
- X
- X { NULL }
- X};
- X
- X
- Xgetdriver(name)
- Xchar *name; {
- X
- X be = BNULL;
- X if (B[0].bename == NULL) {
- X fprintf(stderr, "%s: No drivers configured!\n", progname);
- X exit(1);
- X }
- X
- X if (B[1].bename == NULL) {
- X if (strcmp(B[0].bename, name)) {
- X fprintf(stderr, "%s: Asked for driver '%s', only %s exists\n",
- X progname, name, B[0].bename);
- X exit(1);
- X }
- X be = &B[0];
- X return;
- X }
- X for (be = B; be->bename != NULL; be++)
- X if (strcmp(name, be->bename) == 0)
- X return;
- X fprintf(stderr, "%s: No driver called '%s' configured\n", progname, name);
- X exit(1);
- X}
- END_OF_FILE
- if test 1916 -ne `wc -c <'t2conf.c'`; then
- echo shar: \"'t2conf.c'\" unpacked with wrong size!
- fi
- # end of 't2conf.c'
- fi
- if test -f 'tmac.t2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tmac.t2'\"
- else
- echo shar: Extracting \"'tmac.t2'\" \(2036 characters\)
- sed "s/^X//" >'tmac.t2' <<'END_OF_FILE'
- X.\" Copyright 1985, 1986, 1987, 1988 Chris Lewis
- X.\" All Rights Reserved
- X.\"
- X.\" Permission to copy and further distribute is freely given provided
- X.\" this copyright notice remains intact and that this software is not
- X.\" sold for profit.
- X.\"
- X.\" Project: Generic Troff drivers
- X.\" Module: tmac.eci.sh
- X.\" Author: Chris Lewis
- X.\" Specs: MM Prolog
- X.\"ident "@(#)tmac.eci.sh: 1.27 Copyright 89/08/22 14:59:42 Chris Lewis"
- X.\"endif
- X.so /usr/lib/tmac/tmac.m
- X.tr \(bs
- X.ds}2 Elegant Communications Inc.
- X.dsIn \*(}2
- X.dsBU \s+2\(bu\s0
- X'lg 0
- X.desR
- X.\"Output request sequence - thru .tm - caught by backend
- X.if t \{\
- X.\"M is illegal C/A/T opcode - triggers troff2 to start collecting.
- X.\"newline is terminator
- X'tm M\\$1
- X\}
- X..
- X.de eX
- X.ie \\w'\\$1'=0 .ds ee
- X.el .ds ee "\\$1
- X.DS \\$2 \\$3
- X\!.fp 1 C
- X.\"\!.lg 0
- X\!.cs 1 24
- X.ss 24
- X\!.br
- X..
- X.de eE
- X\!.fp 1 R
- X\!.cs 1
- X.ss 12
- X\!.br
- X\.if \\w'\\*(ee'>0 .FG "\\*(ee"
- X.DE
- X..
- X.ds HP +4 +2
- X.ds HF 3 3 2 2
- X.OH "'''Elegant Communications Inc.'"
- X.EH "'''Elegant Communications Inc.'"
- X.PH "''''"
- X.if t .PF "''\s8481 University Avenue, Suite 602, Toronto, Canada, M5G 2E9 (416)-595-5425, FAX (416) 595-5439\s0''"
- X.if n .PF "''481 University Avenue, Suite 602, Toronto, Canada''"
- X.\".OF "'Page \\\\nP''\\\\*(DT'"
- X.OF "'\\\\*(DT''Page \\\\nP'"
- X.EF "'\\\\*(DT''Page \\\\nP'"
- X.de nH
- X.OF "''''"
- X.EF "''''"
- X.PF "''''"
- X.OH "''''"
- X.EH "''''"
- X.PH "''''"
- X..
- X.de aD
- X.SP 3
- X.DS
- XElegant Communications Inc.
- X481 University Avenue,
- XSuite 602
- XToronto, Ontario
- XM5G 2E9
- X
- XPhone: (416) 595-5425
- XFax: (416) 595-5439
- X.DE
- X..
- X.\" Appendix Macros
- X.de AH
- X.if \\n(aH=0\{
- X.nr aH 1
- X.nr h1 0\}
- X.nr;1 0\\$1
- X.if!\\n(;1 .)D "aH:bad arg:\\$1"
- X.if2-\\n(;1 .nr h2 0 1
- X.if3-\\n(;1 .nr h3 0 1
- X.if4-\\n(;1 .nr h4 0 1
- X.if5-\\n(;1 .nr h5 0 1
- X.if6-\\n(;1 .nr h6 0 1
- X.if7-\\n(;1 .nr h7 0 1
- X.nr h\\n(;1 +1
- X.afh1 A
- X.ds}0 \\n(h1.
- X.if0\\$1-1 .as }0 \\n(h2
- X.if0\\$1-2 .as }0 .\\n(h3
- X.if0\\$1-3 .as }0 .\\n(h4
- X.if0\\$1-4 .as }0 .\\n(h5
- X.if0\\$1-5 .as }0 .\\n(h6
- X.if0\\$1-6 .as }0 .\\n(h7
- X.nr Hu \\n(;1
- X.HU "Appendix \\*(}0\\ \\ \\$2"
- X..
- X.rm )k
- END_OF_FILE
- if test 2036 -ne `wc -c <'tmac.t2'`; then
- echo shar: \"'tmac.t2'\" unpacked with wrong size!
- fi
- chmod +x 'tmac.t2'
- # end of 'tmac.t2'
- fi
- if test -f 'upload.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'upload.sh'\"
- else
- echo shar: Extracting \"'upload.sh'\" \(1284 characters\)
- sed "s/^X//" >'upload.sh' <<'END_OF_FILE'
- X:
- X#@(#)upload 1.1 89/05/18
- Xrlp -dgate!AppleLaser << 'END'
- X
- X/savearea save def
- X
- X/tmp 1 string def
- X
- X/myscale {
- X 2 mul round cvi
- X} def
- X
- X/dumpwidths {
- X
- X dup
- X ( ) cvs print
- X (\n) print
- X findfont 18 scalefont setfont
- X 0 1 255
- X {
- X newpath
- X /i exch def
- X 0 0 moveto
- X tmp 0 i put
- X
- X tmp stringwidth pop /width exch def
- X
- X % Set current point again.
- X 0 0 moveto
- X /curx currentpoint pop def
- X
- X % retrieve bounding box info.
- X tmp false charpath flattenpath pathbbox
- X /ury exch def
- X /urx exch def
- X /lly exch def
- X /llx exch def
- X
- X % calc left bearing as leftx - curx
- X
- X /lbear llx curx sub myscale def
- X
- X % calc height as upper y - lower y
- X
- X /heights ury lly sub myscale def
- X
- X % calc right bearing as width - upper x
- X
- X /rbear width urx curx sub sub myscale def
- X
- X i ( ) cvs print (,) print
- X lbear ( ) cvs print (,) print
- X width myscale ( ) cvs print (,) print
- X rbear ( ) cvs print (,) print
- X heights ( ) cvs print (\n) print
- X
- X
- X }
- X for
- X} def
- X
- XFontDirectory {
- X pop
- X ( ) cvs print
- X (\n) print
- X} forall
- X
- XFontDirectory {
- X pop
- X dup ( ) cvs (cmr10-300) ne {
- X dumpwidths
- X } if
- X} forall
- X
- Xsavearea restore
- XEND
- END_OF_FILE
- if test 1284 -ne `wc -c <'upload.sh'`; then
- echo shar: \"'upload.sh'\" unpacked with wrong size!
- fi
- # end of 'upload.sh'
- fi
- if test -f 'utils.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'utils.c'\"
- else
- echo shar: Extracting \"'utils.c'\" \(2125 characters\)
- sed "s/^X//" >'utils.c' <<'END_OF_FILE'
- X/* Copyright 1985, 1986, 1987, 1988 Chris Lewis
- X All Rights Reserved
- X
- X Permission to copy and further distribute is freely given provided
- X this copyright notice remains intact and that this software is not
- X sold for profit.
- X
- X Project: Generic Troff drivers
- X Module: utils.c
- X Author: Chris Lewis
- X Specs: Utility functions
- X */
- X
- X#include "defs.h"
- X
- X#ifndef SVR3
- X#ifndef lint
- Xstatic char SCCSid[] = "@(#)utils.c: 1.7 Copyright 89/07/17 10:58:36 Chris Lewis";
- X#endif
- X#else
- X#ident "@(#)utils.c: 1.7 Copyright 89/07/17 10:58:36 Chris Lewis"
- X#endif
- X
- X#ifdef DEBUG
- Xdebugprintf(fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
- Xchar *fmt;
- Xint a1, a2, a3, a4, a5, a6, a7, a8, a9, a10; {
- X char buf[BUFSIZ];
- X sprintf(buf, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
- X fprintf(diagFile, buf);
- X}
- X#endif
- X
- Xchar *skipblanks(p)
- Xregister char *p; {
- X while (*p && isspace(*p)) p++;
- X return(p);
- X}
- X
- Xchar *gettok(p, bp)
- Xregister char *p, *bp; {
- X p = skipblanks(p);
- X while(*p && !isspace(*p)) *bp++ = *p++;
- X *bp = '\0';
- X return(p);
- X}
- X
- Xinterp(buf, xlator, suffix)
- Xchar *buf, *suffix; FUNC xlator; {
- X register char *p, *ep;
- X char token[512];
- X p = gettok(buf, token);
- X if (0 == strcmp(token, "include") || 0 == strcmp(token, "binclude")) {
- X int binary;
- X FILE *inc;
- X binary = (token[0] == 'b') ? 1: 0;
- X p = gettok(p, token);
- X strcat(token, suffix);
- X if (!(inc = fopen(token, "r"))) {
- X char nbuf[512];
- X if (token[0] != '/') {
- X sprintf(nbuf, "%s/%s", LIBDIR, token);
- X inc = fopen(nbuf, "r");
- X }
- X }
- X if (!inc) {
- X fprintf(stderr, "%s: cannot open file %s\n", progname, token);
- X exit(1);
- X } else {
- X if (binary || !xlator)
- X while ((binary = fread(token, 1, sizeof(token), inc)) > 0)
- X fwrite(token, 1, binary, stdout);
- X else
- X (*xlator)(inc);
- X fclose(inc);
- X }
- X }
- X
- X else {
- X fprintf(stderr, "%s: unknown directive: %s\n", progname, token);
- X exit(1);
- X }
- X}
- X
- Xchar nodename[25];
- Xgetnodename() {
- X FILE *uuname;
- X int c;
- X if ((uuname = popen("uuname -l", "r")) == NULL)
- X strcpy(nodename, "<noname>");
- X else {
- X fscanf(uuname, "%s", nodename);
- X pclose(uuname);
- X }
- X}
- END_OF_FILE
- if test 2125 -ne `wc -c <'utils.c'`; then
- echo shar: \"'utils.c'\" unpacked with wrong size!
- fi
- # end of 'utils.c'
- fi
- echo shar: End of archive 1 \(of 6\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 6 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 6 archives.
- echo "Read README to install psroff"
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
-